{% extends 'base.html' %}
{% load staticfiles %}
{% block css %}
	<link rel="stylesheet" type="text/css" href="{% static 'css/cloud-admin.css' %}" >
	<link rel="stylesheet" type="text/css" href="{% static 'css/themes/default.css' %}" id="skin-switcher" >
	<link rel="stylesheet" type="text/css"  href="{% static 'css/responsive.css' %}" >
	
	<link href="{% static 'font-awesome/css/font-awesome.min.css' %}" rel="stylesheet">
	<!-- DATE RANGE PICKER -->
	<link rel="stylesheet" type="text/css" href="{% static 'js/bootstrap-daterangepicker/daterangepicker-bs3.css' %}" />
	<!-- ANIMATE -->
	<link rel="stylesheet" type="text/css" href="{% static 'css/animatecss/animate.min.css' %}" />
	<!-- SLIDENAV -->
	<link rel="stylesheet" type="text/css" href="{% static 'js/slidernav/slidernav.css' %}" />
	<!-- FONTS -->
	<link href='http://fonts.useso.com/css?family=Open+Sans:300,400,600,700' rel='stylesheet' type='text/css'>
{% endblock css %}

{% block content %}
		<div id="main-content">
			<!-- SAMPLE BOX CONFIGURATION MODAL FORM-->
			<div class="modal fade" id="box-config" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
				<div class="modal-dialog">
				  <div class="modal-content">
					<div class="modal-header">
					  <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					  <h4 class="modal-title">Box Settings</h4>
					</div>
					<div class="modal-body">
					  Here goes box setting content.
					</div>
					<div class="modal-footer">
					  <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
					  <button type="button" class="btn btn-primary">Save changes</button>
					</div>
				  </div>
				</div>
			  </div>
			<!-- /SAMPLE BOX CONFIGURATION MODAL FORM-->
			<div class="container">
				<div class="row">
					<div id="content" class="col-lg-12">
						<!-- PAGE HEADER-->
						<div class="row">
							<div class="col-sm-12">
								<div class="page-header">
									<!-- STYLER -->
									
									<!-- /STYLER -->
									<!-- BREADCRUMBS -->
									<ul class="breadcrumb">
										<li>
											<i class="fa fa-home"></i>
											<a href="index.html">Home</a>
										</li>
										<li>
											<a href="#">More Pages</a>
										</li>
										<li>Address Book</li>
									</ul>
									<!-- /BREADCRUMBS -->
									<div class="clearfix">
										<h3 class="content-title pull-left">Address Book</h3>
									</div>
									<div class="description">Name and Contact Details</div>
								</div>
							</div>
						</div>
						<!-- /PAGE HEADER -->
						<!-- SAMPLE -->
						<div class="row">
							<div class="col-md-12">
								<!-- BOX -->
								<div class="box border green">
									<div class="box-title">
										<h4><i class="fa fa-book"></i>员工信息</h4>
										<div class="tools">
											<a href="#box-config" data-toggle="modal" class="config">
												<i class="fa fa-cog"></i>
											</a>
											<a href="javascript:;" class="reload">
												<i class="fa fa-refresh"></i>
											</a>
											<a href="javascript:;" class="collapse">
												<i class="fa fa-chevron-up"></i>
											</a>
											<a href="javascript:;" class="remove">
												<i class="fa fa-times"></i>
											</a>
										</div>
									</div>
									<div class="box-body">
										<div class="row">
											<div class="col-md-4">
												<div id="address-book">
													<div class="slider-content">
														<ul>

															<li id="z"><a name="z" class="title">z</a>
																<ul>
																	{% for personnel_user in personnel_users %}
																		<li><a class="personnel_users" data_id="{{ personnel_user.id }}" href="#">{{ personnel_user.username }}</a></li>
																	{% endfor %}
																</ul>
															</li>
														</ul>
													</div>
												</div>
											</div>
											<div class="col-md-8">
												<div id="contact-card" class="panel panel-default">
												  <div class="panel-heading">
													<h2 class="panel-title">{{ user.username }}</h2>
                                                      <a href="{% url 'user:cms_personel_modifhome' user.id %}">修改员工信息</a>
												  </div>
												  <div class="panel-body">
													<div id="card" class="row">
														<div class="col-md-6 headshot">
															<img src="{% static 'img/addressbook/1.jpg' %}" alt="" height="200" width="200"/>
														</div>
														<div class="col-md-6">
															<table class="table table-hover">
																<tbody>
																  <tr>					
																	<td><i class="fa fa-name"></i> 姓名</td>
																	<td id="username_per">{{ user.username }}</td>
																  </tr>
																  <tr>
																	<td><i class="fa fa-qqnumber"></i> QQ号</td>
                                                                      <td id="qqnumber">{{ user.qqnumber }}</td>
																  </tr>
																  <tr>
																	<td><i class="fa fa-phone"></i> 手机号</td>
																	<td id="phone">{{ user.phone }}</td>
																  </tr>
																  <tr>
																	<td><i class="fa fa-email"></i> 邮箱</td>
																	<td id="email">{{ user.email }}</td>
																  </tr>
                                                                  <tr>
																	<td><i class="fa fa-native"></i> 籍贯</td>
																	<td id="native">{{ user.native_place }}</td>
																  </tr>
                                                                  <tr>
																	<td><i class="fa fa-envelope"></i> 上月薪资</td>
																	<td id="wage">{{ user.wage }}</td>
																  </tr>
																</tbody>
															  </table>
														</div>
													</div>
												  </div>
												</div>
											</div>
										</div>
									</div>
								</div>
								<!-- /BOX -->
							</div>
						</div>
						<!-- /SAMPLE -->
						<div class="footer-tools">
							<span class="go-top">
								<i class="fa fa-chevron-up"></i> Top
							</span>
						</div>
					</div><!-- /CONTENT-->
				</div>
			</div>
		</div>
{% endblock content %}
	<!--/PAGE -->
	<!-- JAVASCRIPTS -->
	<!-- Placed at the end of the document so the pages load faster -->
	<!-- JQUERY -->
{% block js %}
	<script src="{% static 'js/jquery/jquery-2.0.3.min.js' %}"></script>
	<!-- JQUERY UI-->
	<script src="{% static 'js/jquery-ui-1.10.3.custom/js/jquery-ui-1.10.3.custom.min.js' %}"></script>
	<!-- BOOTSTRAP -->
	<script src="{% static 'bootstrap-dist/js/bootstrap.min.js' %}"></script>
	
		
	<!-- DATE RANGE PICKER -->
	<script src="{% static 'js/bootstrap-daterangepicker/moment.min.js' %}"></script>
	
	<script src="{% static 'js/bootstrap-daterangepicker/daterangepicker.min.js' %}"></script>
	<!-- SLIMSCROLL -->
	<script type="text/javascript" src="{% static 'js/jQuery-slimScroll-1.3.0/jquery.slimscroll.min.js' %}">

    </script><script type="text/javascript" src="{% static 'js/jQuery-slimScroll-1.3.0/slimScrollHorizontal.min.js' %}"></script>
	<!-- BLOCK UI -->
	<script type="text/javascript" src="{% static 'js/jQuery-BlockUI/jquery.blockUI.min.js' %}"></script>
	<!-- SLIDENAV -->
	<script type="text/javascript" src="{% static 'js/slidernav/slidernav.js' %}"></script>
	<!-- COOKIE -->
	<script type="text/javascript" src="{% static 'js/jQuery-Cookie/jquery.cookie.min.js' %}"></script>
	<!-- CUSTOM SCRIPT -->
	<script src="{% static 'js/script.js' %}"></script>
	<script>

		$(function () {
            var $user_display = $(".personnel_users");
            $user_display.click(function () {
                var data_id = $(this).attr("data_id");
                $.get("{% url 'user:cms_personnel_display' %}?userid="+data_id,function(data){
                    $("#username_per").html(data.username);
                    $("#qqnumber").html(data.qqnumber);
                    $("#phone").html(data.phone);
                    $("#email").html(data.email);
                    $("#native").html(data.native_place);
                    $("#wage").html(data.wage);
                });
            })
        });
	</script>
	<!-- /JAVASCRIPTS -->
{% endblock js %}